/*
 * Copyright (C) 2011 hljdrl@gmail.com
 * 
 *            mail:hljdrl@gmail.com
 * 
 * All rights reserved.
 */
package org.andtools.utils;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * 
 *  hljdrl@gmail.com
 */
public class JSONUtils {
	
	public static String getString(JSONObject JSON,String key)
	{
		String res = null;
		try {
			if(JSON.has(key)&&!JSON.isNull(key)){
				res = JSON.getString(key);
			}
		} catch (JSONException e) {
			e.printStackTrace();
		}
		return res;
	}
	public static void getInt(JSONObject JSON,String key)
	{
		
	}

}
